from rest_framework import serializers

from app.models import *

class UserInfoSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = UserInfo            # 要序列化的模型
        fields = ("username","nickname","status","email","signature","re_time","last_login","tokens","create_token","end_token","password")

class RoleSerializer(serializers.ModelSerializer):
    class Meta:
        model=Role
        fields=("title",)

class UsersSerializer(serializers.ModelSerializer):
    class Meta:
        model=Users
        fields=("name","yue",'img','status','time','checks')

class tabsSerializer(serializers.ModelSerializer):
    class Meta:
        model=tabs
        fields=("description",'status')